home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / illu / ibrowsep.lha / Command-00-T08 < prev    next >
Text File  |  1995-08-12  |  2KB  |  44 lines

  1. ;*
  2. ;*   Sample script to invoke nntp client and add news to uucp Newsbase
  3. ;*
  4. ;*  Mandatory parameter of name of news server; all other parameters have
  5. ;*  reasonable defaults (assuming you have a uulib:NewsGroups file).
  6. ;*
  7.  
  8. if NOT EXISTS UULIB:NewsGroups        ;Check we have a Groups file
  9.    echo "You must set up a 'UULIB:NewsGroups' file, or give the name"
  10.    echo "of another file containing the news groups you want"
  11.    quit 10
  12. endif
  13.  
  14. if NOT news.demon.co.uk eq localhost
  15.    if NOT news.demon.co.uk eq $HostName
  16.       if NOT news.demon.co.uk eq $NodeName
  17.          if NOT $Slip0State eq Online
  18.             echo "NNTPTransfer: Not connected."
  19.             quit 10
  20.             endif
  21.          endif
  22.       endif
  23.    endif
  24. endif
  25.  
  26. echo "Pulling News..."
  27. copy amitcp:db/NewsStamp amitcp:db/NewsStamp.bak
  28. echo >t:nntpclient-Commands "NEWGROUPS t:nntp-NewGroups*NNEWNEWS UULIB:NewsGroups uuspool:NewsBatch"
  29.  
  30. failat 11            ;nntpclient has done something at error level 10
  31. nntpclient <t:nntpclient-Commands news.demon.co.uk COMPLEX BATCH 9 BLIP 10 BLIPMSG "NNTP: %5ld articles received" HISTORYFILE AmiTCP:db/NewsHistory STAMPFILE AmiTCP:db/NewsStamp TRACE 3
  32. ;type t:nntpclient-Commands      ;diagnostic - commented out
  33. failat 10            ;back to default
  34. delete t:nntpclient-Commands QUIET  ;don't want command file now
  35. copy uuspool:NewsBatch usr:spool
  36. delete ram:spool/NewsBatch
  37.  
  38. if exists t:nntp-NewGroups    ;Got any new groups ?
  39.    echo "news.demon.co.uk has the following new news groups:"
  40.    echo
  41.    type t:nntp-NewGroups      ; Show new groups
  42.    delete t:nntp-NewGroups quiet ; and get rid of the file
  43. endif
  44.